﻿<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title xmlns:d="http://docbook.org/ns/docbook" xmlns:rf="java:org.jboss.highlight.XhtmlRendererFactory">Appendix C. Reserved Keywords</title>
	<link rel="stylesheet" href="css/espertech.css" type="text/css">
	<meta xmlns:d="http://docbook.org/ns/docbook" xmlns:rf="java:org.jboss.highlight.XhtmlRendererFactory" name="generator" content="DocBook XSL-NS Stylesheets V1.74.0">
	<meta xmlns:d="http://docbook.org/ns/docbook" xmlns:rf="java:org.jboss.highlight.XhtmlRendererFactory" http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="home" href="index.html" title="Esper Reference">
	<link rel="up" href="index.html" title="Esper Reference">
	<link rel="prev" href="appendix_outputlimit.html" title="Appendix B. Runtime Considerations for Output Rate Limiting">
	<link rel="next" href="appendix_eventrepbean.html" title="Appendix D. Event Representation: Plain-Old Java Object Events">
</head>

<body>
	<p xmlns:d="http://docbook.org/ns/docbook" id="title"><a href="./index.html" class="site_href"><strong>www.espertech.com</strong></a><a href="http://www.espertech.com/esper/esper-documentation/" class="doc_href"><strong>Documentation</strong></a></p>
	<ul xmlns:d="http://docbook.org/ns/docbook" class="docnav">
		<li class="previous"><a accesskey="p" href="appendix_outputlimit.html"><strong>Prev</strong></a></li>
		<li class="next"><a accesskey="n" href="appendix_eventrepbean.html"><strong>Next</strong></a></li>
	</ul>
	<div class="appendix" lang="en-US">
		<div class="titlepage">
			<div>
				<div>
					<h2 class="title"><a id="appendix_keywords"></a>Appendix C. Reserved Keywords</h2>
				</div>
			</div>
		</div>
		<p>
			The words in the following table are explicitly reserved in EPL, however certain keywords are allowed as event property names in expressions and as column names in the rename syntax of the <code class="literal">select</code> clause.
		</p>
		<p>
			Most of the words in the table are forbidden by standard SQL as well. A few are reserved because EPL needs them.
		</p>
		<p>
			Names of built-in functions and certain auxiliary keywords are permitted as identifiers for use either as event property names in expressions and for the column rename syntax. The second column in the table below indicates which keywords are acceptable. For example, <code class="literal">count</code> is acceptable.
		</p>
		<p>
			An example of permitted use is:
		</p>
		<pre xmlns="" xmlns:d="http://docbook.org/ns/docbook" xmlns:rf="java:org.jboss.highlight.XhtmlRendererFactory" class="">select last, count(*) as count from MyEvent</pre>
		<p>
			This example shows an incorrect use of a reserved keyword:
		</p>
		<pre xmlns="" xmlns:d="http://docbook.org/ns/docbook" xmlns:rf="java:org.jboss.highlight.XhtmlRendererFactory" class="">// incorrect
select insert from MyEvent</pre>
		<p>
			The table of explicitly reserved keywords and permitted keywords:
		</p>
		<div class="table"><a id="d0e59877"></a>
			<p class="title"><b>Table C.1. Reserved Keywords</b></p>
			<div class="table-contents">
				<table summary="Reserved Keywords" border="1">
					<colgroup>
						<col>
						<col>
					</colgroup>
					<thead>
						<tr>
							<th>Keyword</th>
							<th>Property Name and Rename Syntax</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td>after</td>
							<td>-</td>
						</tr>
						<tr>
							<td>all</td>
							<td>-</td>
						</tr>
						<tr>
							<td>and</td>
							<td>-</td>
						</tr>
						<tr>
							<td>as</td>
							<td>-</td>
						</tr>
						<tr>
							<td>at</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>asc</td>
							<td>-</td>
						</tr>
						<tr>
							<td>avedev</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>avg</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>between</td>
							<td>-</td>
						</tr>
						<tr>
							<td>by</td>
							<td>-</td>
						</tr>
						<tr>
							<td>case</td>
							<td>-</td>
						</tr>
						<tr>
							<td>cast</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>coalesce</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>context</td>
							<td>-</td>
						</tr>
						<tr>
							<td>count</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>create</td>
							<td>-</td>
						</tr>
						<tr>
							<td>current_timestamp</td>
							<td>-</td>
						</tr>
						<tr>
							<td>cube</td>
							<td>-</td>
						</tr>
						<tr>
							<td>dataflow</td>
							<td>-</td>
						</tr>
						<tr>
							<td>day</td>
							<td>-</td>
						</tr>
						<tr>
							<td>days</td>
							<td>-</td>
						</tr>
						<tr>
							<td>delete</td>
							<td>-</td>
						</tr>
						<tr>
							<td>define</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>desc</td>
							<td>-</td>
						</tr>
						<tr>
							<td>distinct</td>
							<td>-</td>
						</tr>
						<tr>
							<td>else</td>
							<td>-</td>
						</tr>
						<tr>
							<td>end</td>
							<td>-</td>
						</tr>
						<tr>
							<td>escape</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>events</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>every</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>exists</td>
							<td>-</td>
						</tr>
						<tr>
							<td>expression</td>
							<td>-</td>
						</tr>
						<tr>
							<td>false</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>first</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>for</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>from</td>
							<td>-</td>
						</tr>
						<tr>
							<td>full</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>group</td>
							<td>-</td>
						</tr>
						<tr>
							<td>grouping</td>
							<td>-</td>
						</tr>
						<tr>
							<td>grouping_id</td>
							<td>-</td>
						</tr>
						<tr>
							<td>having</td>
							<td>-</td>
						</tr>
						<tr>
							<td>hour</td>
							<td>-</td>
						</tr>
						<tr>
							<td>hours</td>
							<td>-</td>
						</tr>
						<tr>
							<td>in</td>
							<td>-</td>
						</tr>
						<tr>
							<td>initiated</td>
							<td>-</td>
						</tr>
						<tr>
							<td>inner</td>
							<td>-</td>
						</tr>
						<tr>
							<td>insert</td>
							<td>-</td>
						</tr>
						<tr>
							<td>instanceof</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>into</td>
							<td>-</td>
						</tr>
						<tr>
							<td>irstream</td>
							<td>-</td>
						</tr>
						<tr>
							<td>is</td>
							<td>-</td>
						</tr>
						<tr>
							<td>istream</td>
							<td>-</td>
						</tr>
						<tr>
							<td>join</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>last</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>lastweekday</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>left</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>limit</td>
							<td>-</td>
						</tr>
						<tr>
							<td>like</td>
							<td>-</td>
						</tr>
						<tr>
							<td>max</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>match_recognize</td>
							<td>-</td>
						</tr>
						<tr>
							<td>matched</td>
							<td>-</td>
						</tr>
						<tr>
							<td>matches</td>
							<td>-</td>
						</tr>
						<tr>
							<td>median</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>measures</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>merge</td>
							<td>-</td>
						</tr>
						<tr>
							<td>metadatasql</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>min</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>minute</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>minutes</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>microsecond</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>microseconds</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>millisecond</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>milliseconds</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>msec</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>new</td>
							<td>-</td>
						</tr>
						<tr>
							<td>not</td>
							<td>-</td>
						</tr>
						<tr>
							<td>null</td>
							<td>-</td>
						</tr>
						<tr>
							<td>offset</td>
							<td>-</td>
						</tr>
						<tr>
							<td>on</td>
							<td>-</td>
						</tr>
						<tr>
							<td>or</td>
							<td>-</td>
						</tr>
						<tr>
							<td>order</td>
							<td>-</td>
						</tr>
						<tr>
							<td>outer</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>output</td>
							<td>-</td>
						</tr>
						<tr>
							<td>partition</td>
							<td>-</td>
						</tr>
						<tr>
							<td>pattern</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>prev</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>prior</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>regexp</td>
							<td>-</td>
						</tr>
						<tr>
							<td>retain-union</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>retain-intersection</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>right</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>rollup</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>rstream</td>
							<td>-</td>
						</tr>
						<tr>
							<td>sec</td>
							<td>-</td>
						</tr>
						<tr>
							<td>second</td>
							<td>-</td>
						</tr>
						<tr>
							<td>seconds</td>
							<td>-</td>
						</tr>
						<tr>
							<td>select</td>
							<td>-</td>
						</tr>
						<tr>
							<td>set</td>
							<td>-</td>
						</tr>
						<tr>
							<td>sets</td>
							<td>-</td>
						</tr>
						<tr>
							<td>some</td>
							<td>-</td>
						</tr>
						<tr>
							<td>snapshot</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>sql</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>start</td>
							<td>-</td>
						</tr>
						<tr>
							<td>stddev</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>sum</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>terminated</td>
							<td>-</td>
						</tr>
						<tr>
							<td>then</td>
							<td>-</td>
						</tr>
						<tr>
							<td>true</td>
							<td>-</td>
						</tr>
						<tr>
							<td>unidirectional</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>until</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>update</td>
							<td>-</td>
						</tr>
						<tr>
							<td>usec</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>using</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>variable</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>values</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>weekday</td>
							<td>yes</td>
						</tr>
						<tr>
							<td>when</td>
							<td>-</td>
						</tr>
						<tr>
							<td>where</td>
							<td>-</td>
						</tr>
						<tr>
							<td>while</td>
							<td>-</td>
						</tr>
						<tr>
							<td>window</td>
							<td>yes</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div><br class="table-break">
	</div>
	<ul xmlns:d="http://docbook.org/ns/docbook" class="docnav">
		<li class="previous"><a accesskey="p" href="appendix_outputlimit.html"><strong>Prev</strong>Appendix B. Runtime Considerations for Output Rat...</a></li>
		<li class="up"><a accesskey="u" href="#"><strong>Top of page</strong></a></li>
		<li class="home"><a accesskey="h" href="index.html"><strong>Front page</strong></a></li>
		<li class="next"><a accesskey="n" href="appendix_eventrepbean.html"><strong>Next</strong>Appendix D. Event Representation: Plain-Old Java ...</a></li>
	</ul>
</body>

</html>